using System;
using System.Collections.Generic;
using System.Text;

namespace OpenFlashChartLib
{
    public class DotLineGraphType : BarGraphType
    {

        public static readonly string DotLineGraphToken = "line_dot";
        private int _dotWidth;
        public DotLineGraphType(int width, int _dotWidth, string _color, string _legendText, int? _legendTextHeight) 
            : base(width, _color, _legendText, _legendTextHeight)
        {
            this._dotWidth = _dotWidth;
        }

        /// <summary>
        /// Gets or sets dot width
        /// </summary>
        public int DotWidth
        {
            get
            {
                return _dotWidth;
            }
            set
            {
                _dotWidth = value;
            }
        }

        public override string GraphTypeTocken
        {
            get
            {
                return DotLineGraphToken;
            }
        }

        public override void RenderContent(System.Web.UI.HtmlTextWriter writer)
        {
            string token = GraphTypeTocken;
            if (ValueSet > 0)
                token += "_" + ValueSet;
            writer.Write(token);
            writer.Write("=");
            writer.Write(Alpha);
            writer.Write(",");
            writer.Write(Color);
            writer.Write(",");
            writer.Write(OulineColor);
            writer.Write(",");
            writer.Write(LegendText);
            writer.Write(",");
            if (LegendTextHeight != null)
            {
                writer.Write(LegendTextHeight.Value);
            }
            writer.Write(",");
            writer.Write(_dotWidth);
        }

    }
}
